import { request } from './request'

export function getAll(){
  return request({
    url:'/admin/getAll',
    method:'GET'
  })
}

export function queryAdminList(page,rows){
  return request({
    url:'/admin/findByPage',
    method:"GET",
    params:{
      pageNow: page,
      pageSize: rows
    }
  })
}

export function addOrUpdate(form){
  return request({
    url:'/admin/addOrUpdate',
    method:"POST",
    data:form
  })
}

export function deleteAdmin(id){
  return request({
    url:'/admin/delete',
    method:'GET',
    params:{
      aid: id
    }
  })
}


export function queryUserList(page,rows){
  return request({
    url:'/admin/findUserByPage',
    method:"GET",
    params:{
      pageNow: page,
      pageSize: rows
    }
  })
}

export function queryHouseList(page,rows){
  return request({
    url:'/admin/findHouseByPage',
    method:"GET",
    params:{
      pageNow: page,
      pageSize: rows
    }
  })
}

export function updateHouse(form){
  return request({
    url:'/admin/updateHouse',
    method:"POST",
    data:form
  })
}

export function queryExamineList(page,rows){
  return request({
    url:'/admin/findExamineByPage',
    method:"GET",
    params:{
      pageNow: page,
      pageSize: rows
    }
  })
}

export function updateExamine(form){
  return request({
    url:'/admin/updateExamine',
    method:"POST",
    data:form
  })
}

export function queryReportList(page,rows){
  return request({
    url:'/admin/findReportByPage',
    method:"GET",
    params:{
      pageNow: page,
      pageSize: rows
    }
  })
}

export function updateReport(form){
  return request({
    url:'/admin/updateReport',
    method:"POST",
    data:form
  })
}